import React from 'react'
import AuthRoutes from '../src/routes/index'
import {shouldAutoApps} from '@s/modules/user'
import { useDispatch } from 'react-redux'
import {isLogin} from '@u'
function App() {
const dispatch = useDispatch()
//判断有没有登录，有登录就触发redux中静态角色的方法
//在定义路由那设置好像也可以
if (isLogin()) {
  dispatch(shouldAutoApps())
}

  return (
    <div className="App">
   <AuthRoutes/>
    </div>
  )
}

export default App
